<?php

include _ITSTOCK_INCLUDE_DIR_.'html_search.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'html_message.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'html_navigation.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'html_menu.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'html_table_list.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'settings_html.inc.php';

$itstock_page_info['css'] = array('main.css', 'aside.css', 'float_menu.css', 'page.css', 'table.css', 'lightbox.css', 'form_save.css');
$itstock_page_info['js'] = array('common.js', 'ajax.js', 'request.js', 'lightbox.js', 'search.js', 'settings.js');
$itstock_page_info['title'] = 'Products - IT Stock Tool';
$itstock_page_info['menu_title'] = 'Software Products';
$itstock_page_info['menu_items'] = array('<label onclick="itstock_page_request(\'add_product\')">New Product</label>');
$itstock_page_info['search_page'] = 'product';

$_SESSION['on_delete']['product'] = $_SERVER['REQUEST_URI'];
$_SESSION['on_save']['product'] = $_SERVER['REQUEST_URI'];

$structure = itstock_html_search_init('product');
$structure['table_headers'] = array('N&deg;', 'Vendor', 'Product', '', '');
$structure['table_indexes'] = array('vendor', 'product');
$structure['table_actions'] = array(
  '<img src="img/edit.png" onclick="itstock_page_request(\'add_product\', \'%s\')" title="Edit">',
  '<a href="delete.php?type=product&id=%s"><img src="img/delete.png" title="Eliminar"></a>'
);
$structure['table_error'] = 'No products have been found.';

itstock_html_base_header($itstock_page_info);
echo '<div class="aside">';
itstock_settings_menu();
echo '</div>';
echo '<div class="bside">';
itstock_html_menu_search($itstock_page_info);
echo '<table>';
itstock_html_table_list_data($structure);
echo '</table>';
echo '</div>';
itstock_html_base_footer();
?>
